class SingLenton{  //饿汉模式
    public static SingLenton instance=new SingLenton();
    public  static SingLenton getInstance(){
        return instance;
    }

    private SingLenton(){

    }

}



public class Demo1 {
    public static void main(String[] args) {
        SingLenton s1=SingLenton.getInstance();
        SingLenton s2=SingLenton.getInstance();

        System.out.println(s1==s2);
    }

}
